home *** CD-ROM | disk | FTP | other *** search
-
- DEFINT A-Z
- SUB HerculesPrintScreen STATIC
-
-
- 'Print screen utility for Hercules (tm) and compatible video cards
- 'and Epson and strictly compatible printers.
-
- DEF SEG = &HB000 'set segment pointer to begining of screen 3 page 0
-
- WIDTH "LPT1:", 255 'set print width to 256 bytes wide
- n2 = 1 'number of columns for printing (INT (348/256))
- n1 = 347 - (255) 'second number of colums for printing
-
- OPEN "LPT1:BIN" FOR OUTPUT AS 1 'Open printer device, binary mode
-
- PRINT #1, CHR$(27); "A"; CHR$(8);
- 'set printer line feed to 8/72"
-
- FOR x = 89 TO 0 STEP -1
- PRINT #1, CHR$(27); "K"; CHR$(n1); CHR$(n2);
- ' set printer for single density bit image graphics mode
-
- FOR y = x TO x + 7830 STEP 90
-
- FOR t = 0 TO 3 '
- '
- y1 = t * 8192 'step through each of the four scan lines
- a = PEEK(y + y1) '
-
- b = 0
-
- '***************** Flip byte for printer ******************
- '
- 'This routine flips the byte that was taken from the screen
- 'so that it appears right-side-up on the printer.
-
- IF (a AND &H80) = &H80 THEN b = b + &H1
- IF (a AND &H40) = &H40 THEN b = b + &H2
- IF (a AND &H20) = &H20 THEN b = b + &H4
- IF (a AND &H10) = &H10 THEN b = b + &H8
- IF (a AND &H8) = &H8 THEN b = b + &H10
- IF (a AND &H4) = &H4 THEN b = b + &H20
- IF (a AND &H2) = &H2 THEN b = b + &H40
- IF (a AND &H1) = &H1 THEN b = b + &H80
-
- PRINT #1, CHR$(b);
- ' print information in bit image graphics to the printer
-
- NEXT t
-
- NEXT y
- PRINT #1,
-
- NEXT x
-
- CLOSE 1
-
- END SUB
-
-